/******************************************************************************
 **
 **    LISA Confidential
 **
 **    Source Materials
 **
 **    (C) COPYRIGHT LISA 2008-2009
 **
 **
 **  File Name:      CancelProcessInstanceCommand.java
 **  Description:
 **  Date:           2008-10-28
 **  Author:         LisaQian
 ******************************************************************************/
package com.ti.andon.workflow.command;

import org.jbpm.JbpmContext;
import org.jbpm.command.Command;

import com.ti.andon.workflow.WFConstants;

public class CancelProcessInstanceCmd implements Command
{
	/**
	 * The serial version id.
	 */
	private static final long serialVersionUID = 7058799735706764921L;

	String businessKey;
	String processDefinitionName;
	Long actorId;
	// The comments from the requester when he cancels the request
	String comment;

	/**
	 * Constructor.
	 * */
	public CancelProcessInstanceCmd(String businessKey, String processDefintion, Long actorId, String comment)
	{
		this.businessKey = businessKey;
		this.processDefinitionName = processDefintion;
		this.actorId = actorId;
		this.comment = comment;
	}

	/**
	 * Retrieves the destination node name of the specified task instance
	 * matching process definition name, the business key, actor id. And sets
	 * the variable to the task instance, triggers the transition.
	 * 
	 * @param jbpmContext
	 * @return The destination node name
	 */
	public Object execute(JbpmContext jbpmContext) throws Exception
	{
//		TransProcessInstancebyProcessInstanceCmd transProcessInstanceCommand = new TransProcessInstancebyProcessInstanceCmd(
//				businessKey, processDefinitionName, WFConstants.TSN_T_DELETE_DRAFT_BP, actorId, comment);

//		return transProcessInstanceCommand.execute(jbpmContext);
		return null;
	}

}
